package com.gzs.learn.springcloud.dto;

import com.fasterxml.jackson.annotation.JsonProperty;

public class ErrorResponse {

    @JsonProperty("error_code")
    private String errorCode;

    private String message;

    private Object payload;

    public ErrorResponse() {

    }

    public ErrorResponse(String errorCode) {
        this.errorCode = errorCode;
    }

    public ErrorResponse(String errorCode, String message) {
        this(errorCode);
        this.message = message;
    }

    public ErrorResponse(String errorCode, Object payload) {
        this(errorCode);
        this.payload = payload;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public String getMessage() {
        return message;
    }

    public Object getPayload() {
        return payload;
    }
}
